package gridview;

import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;

import com.unipv14.androidgallery.CurrentImageActivity;
import com.unipv14.androidgallery.ImageShower;



public class GridElementListener implements OnClickListener{

	private int position;
	private String[] imagesPaths;
	private Activity currentActivity;
	
	public GridElementListener(int position,String[] imagesPaths,
			Activity currentActivity){
		this.imagesPaths=imagesPaths;
		this.currentActivity=currentActivity;
		this.position=position;
	}
	
	@Override
	public void onClick(View v) {
		ImageShower.showImage(imagesPaths, currentActivity,
				imagesPaths[position],CurrentImageActivity.class);
	}
	
}
